#ifndef PUBPRI_FILES_HEADER
#define PUBPRI_FILES_HEADER


/*
The code here and in PubPri_Files.cpp is taken from
http://www.cryptopp.com/w/images/4/4f/Cryptopp-key-gen.zip

and

http://www.cryptopp.com/wiki/Keys_and_Formats
*/
#include <iostream>
#include <string>
#include <stdexcept>
#include "cryptopp/queue.h"
#include "cryptopp/files.h"
#include "cryptopp/rsa.h"
#include "cryptopp/base64.h"
#include "cryptopp/cryptlib.h"

void SavePrivateKey(const std::string& filename, const CryptoPP::PrivateKey& key);
void SavePublicKey(const std::string& filename, const CryptoPP::PublicKey& key);

void Save(const std::string& filename, const CryptoPP::BufferedTransformation& bt);

void LoadPrivateKey(const std::string& filename, CryptoPP::PrivateKey& key);
void LoadPublicKey(const std::string& filename, CryptoPP::PublicKey& key);

void Load(const std::string& filename, CryptoPP::BufferedTransformation& bt);

void EncodePrivateKey(const std::string& filename, const CryptoPP::RSA::PrivateKey& key);

void EncodePublicKey(const std::string& filename, const CryptoPP::RSA::PublicKey& key);

void Encode(const std::string& filename, const CryptoPP::BufferedTransformation& bt);

#endif
